package com.lieve.servicea.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.stereotype.Component;

/**
 * @author sunlijiang
 * @date 2020/2/29
 */
//@Component
@Slf4j
public class LieveBeanPostProcessor implements BeanPostProcessor {

    @Override
    public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
        System.out.println("com.lieve.servicea.config.LievePostBeanProcessor.postProcessBeforeInitialization");
        return bean;
    }

    @Override
    public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
        System.out.println("com.lieve.servicea.config.LievePostBeanProcessor.postProcessAfterInitialization");
        return bean;
    }
}
